package com.cmschina.custom;

import java.lang.reflect.Method;

/**
 * @author: li chao
 * @Desc:
 * @create: 2024-08-07 10:47
 **/
public class MapperContextHolder {
    private static final ThreadLocal<Method> CURRENT_MAPPER_METHOD = new ThreadLocal<>();

    public static void setCurrentMapperMethod(Method method) {
        CURRENT_MAPPER_METHOD.set(method);
    }

    public static Method getCurrentMapperMethod() {
        return CURRENT_MAPPER_METHOD.get();
    }

    public static void clearCurrentMapperMethod() {
        CURRENT_MAPPER_METHOD.remove();
    }
}